//
//  GKHomeTitleBtn.swift
//  MicroBlogFunc
//
//  Created by GK on 16/4/13.
//  Copyright © 2016年 GK. All rights reserved.
//

import UIKit

class GKHomeTitleBtn: UIButton {

    init(title:String)
    {
        super.init(frame: CGRectZero)
        self.sizeToFit()
        self.setTitle(title, forState: UIControlState.Normal)
        self.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        self.setImage(UIImage(named: "navigationbar_arrow_down"), forState: UIControlState.Normal)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        titleLabel?.frame.origin.x = 0
        imageView?.frame.origin.x = titleLabel!.frame.width + 3
        
    }

}
